Add longest-line sizing for wrapped Text - #58351
Conversation
Summary: Add `textWidthMode="longest-line"` to size wrapped `Text` to its widest rendered line on Android and iOS. This keeps content-proportional spacing in horizontal layouts without an `onTextLayout` round trip; the default measurement behavior is unchanged. Changelog: [General][Added] - Add `textWidthMode="longest-line"` for sizing wrapped `Text` to its widest rendered line. Differential Revision: D118718410
|
@Abbondanzo has exported this pull request. If you are a Meta employee, you can view the originating Diff in D118718410. |
|
Warning JavaScript API change detected This PR commits an update to
This change was flagged as: |
|
/review |
🤖 AI code reviewDecision: Ready for human review (with comments) Overall PR risk: Low. Change is additive and leaves the default measurement path unchanged. Blast radius is limited to Text that sets the new mode. Most plausible break is Paper Android keeps the old width after a prop change because the diff omits the new field. 🟡 Warning (1)
This review is advisory — it never blocks a merge and never auto-approves. |
|
/review |
Summary:
Add
textWidthMode="longest-line"to size wrappedTextto its widest rendered line on Android and iOS. This keeps content-proportional spacing in horizontal layouts without anonTextLayoutround trip; the default measurement behavior is unchanged.Changelog:
[General][Added] - Add
textWidthMode="longest-line"for sizing wrappedTextto its widest rendered line.Differential Revision: D118718410